home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / dblrou1r / mbox.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-11-04  |  4.7 KB  |  137 lines

  1. VERSION 5.00
  2. Object = "{3BA9BED1-71BA-11D2-A2CD-702C4EC10700}#1.0#0"; "Gradients.ocx"
  3. Begin VB.Form MBox 
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Form2"
  6.    ClientHeight    =   1575
  7.    ClientLeft      =   0
  8.    ClientTop       =   0
  9.    ClientWidth     =   4335
  10.    Icon            =   "MBox.frx":0000
  11.    LinkTopic       =   "Form2"
  12.    ScaleHeight     =   105
  13.    ScaleMode       =   3  'Pixel
  14.    ScaleWidth      =   289
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   2  'CenterScreen
  17.    Begin Gradients.Gradient Gradient1 
  18.       Height          =   1215
  19.       Left            =   0
  20.       Top             =   360
  21.       Width           =   4335
  22.       _ExtentX        =   7646
  23.       _ExtentY        =   2143
  24.       Begin VB.CommandButton btnOut 
  25.          DisabledPicture =   "MBox.frx":0E42
  26.          DownPicture     =   "MBox.frx":21FC
  27.          Height          =   495
  28.          Left            =   1200
  29.          Picture         =   "MBox.frx":502E
  30.          Style           =   1  'Graphical
  31.          TabIndex        =   2
  32.          Top             =   120
  33.          Width           =   2055
  34.       End
  35.       Begin VB.Timer Timer1 
  36.          Enabled         =   0   'False
  37.          Interval        =   1000
  38.          Left            =   0
  39.          Top             =   0
  40.       End
  41.       Begin VB.CommandButton btnOK 
  42.          DisabledPicture =   "MBox.frx":7E60
  43.          DownPicture     =   "MBox.frx":9B3E
  44.          Height          =   375
  45.          Left            =   240
  46.          Picture         =   "MBox.frx":E4F0
  47.          Style           =   1  'Graphical
  48.          TabIndex        =   0
  49.          Top             =   720
  50.          Width           =   3855
  51.       End
  52.    End
  53.    Begin VB.Label lblTitle 
  54.       Alignment       =   2  'Center
  55.       BackColor       =   &H00400000&
  56.       Caption         =   "Thang"
  57.       BeginProperty Font 
  58.          Name            =   "Comic Sans MS"
  59.          Size            =   12
  60.          Charset         =   0
  61.          Weight          =   400
  62.          Underline       =   0   'False
  63.          Italic          =   0   'False
  64.          Strikethrough   =   0   'False
  65.       EndProperty
  66.       ForeColor       =   &H0000FFFF&
  67.       Height          =   375
  68.       Left            =   0
  69.       TabIndex        =   1
  70.       Top             =   0
  71.       Width           =   4335
  72.    End
  73. Attribute VB_Name = "MBox"
  74. Attribute VB_GlobalNameSpace = False
  75. Attribute VB_Creatable = False
  76. Attribute VB_PredeclaredId = True
  77. Attribute VB_Exposed = False
  78. ' The messagebox form.
  79. ' Makes use of my very own -=FREEWARE=- gradient control! Nifty huh?
  80. Private bActive As Boolean
  81. Private Sub btnOK_Click()
  82.       bActive = False
  83.       btnOK.Enabled = False
  84.       Timer1.Enabled = True
  85. End Sub
  86. Private Sub btnOut_Click()
  87.       OutPutfrm.Show vbModal, Me
  88. End Sub
  89. Private Sub Form_Load()
  90.       Timer1.Enabled = False
  91.       bActive = True
  92.       Gradient1.Red1 = 254
  93.       Gradient1.Green1 = 254
  94.       Gradient1.Blue1 = 1
  95.       Gradient1.Red2 = 254
  96.       Gradient1.Green2 = 1
  97.       Gradient1.Blue2 = 1
  98.       
  99.       Me.Show
  100. End Sub
  101. Private Sub Form_Paint()
  102.       lblTitle.Refresh
  103.       Dim RedVel, GreenVel, BlueVel, RedVel1, GreenVel2, BlueVel2 As Integer
  104.       RedVel = 1
  105.       GreenVel = 3
  106.       BlueVel = 2
  107.       RedVel2 = 2
  108.       GreenVel2 = 1
  109.       BlueVel2 = 3
  110.       While (bActive)
  111.             DoEvents
  112.             Gradient1.Red1 = Gradient1.Red1 + RedVel
  113.                   If Gradient1.Red1 >= 255 Then RedVel = -RedVel
  114.                   If Gradient1.Red1 <= 0 Then RedVel = -RedVel
  115.             Gradient1.Green1 = Gradient1.Green1 + GreenVel
  116.                   If Gradient1.Green1 >= 255 Then GreenVel = -GreenVel
  117.                   If Gradient1.Green1 <= 0 Then GreenVel = -GreenVel
  118.             Gradient1.Blue1 = Gradient1.Blue1 + BlueVel
  119.                   If Gradient1.Blue1 >= 255 Then BlueVel = -BlueVel
  120.                   If Gradient1.Blue1 <= 0 Then BlueVel = -BlueVel
  121.                   
  122.             Gradient1.Red2 = Gradient1.Red2 + RedVel2
  123.                   If Gradient1.Red2 >= 255 Then RedVel2 = -RedVel2
  124.                   If Gradient1.Red2 <= 0 Then RedVel2 = -RedVel2
  125.             Gradient1.Green2 = Gradient1.Green2 + GreenVel2
  126.                   If Gradient1.Green2 >= 255 Then GreenVel2 = -GreenVel2
  127.                   If Gradient1.Green2 <= 0 Then GreenVel2 = -GreenVel2
  128.             Gradient1.Blue2 = Gradient1.Blue2 + BlueVel2
  129.                   If Gradient1.Blue2 >= 255 Then BlueVel2 = -BlueVel2
  130.                   If Gradient1.Blue2 <= 0 Then BlueVel2 = -BlueVel2
  131.             Gradient1.RefreshDisplay
  132.       Wend
  133. End Sub
  134. Private Sub Timer1_Timer()
  135.       Unload Me
  136. End Sub
  137.